{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{\"code\":\"20000\",\"message\":\"请求成功\",\"data\":{\"currentPage\":1,\"dataList\":[],\"pageSize\":1,\"totalSize\":0}}\n"
     ]
    }
   ],
   "source": [
    "import sys\n",
    "sys.path.append('..')\n",
    "import service.CIService as ci\n",
    "import service.AnalysisService as analysisService\n",
    "ciInfoList = ci.getBranchDetermineInfo(\"2024/09/22\",\"2024/10/14\")\n",
    "other = ci.getCIInfoList(\"2024/09/22\",\"2024/10/14\")\n",
    "ciInfoList.extend(other)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "for ciInfo in ciInfoList:\n",
    "    analysisService.analyzeCI(ciInfo.cve_id)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "for ciInfo in ciInfoList:\n",
    "    analysisService.analyzeGitee(ciInfo.cve_id)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "Issue('no':#IAP0NC, 'title':[安全问题]: 【安全】漏洞CVE-2024-42286, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IAP0NC?from=project-issue, 'state':已完成, 'cve':CVE-2024-42286, 'targetId':17963400)\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "Issue('no':#I94PRN, 'title':[安全问题]: 【漏洞】 【master】CVE-2024-1151, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/I94PRN?from=project-issue, 'state':已拒绝, 'cve':CVE-2024-1151, 'targetId':15336563)\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "Issue('no':#I94PT0, 'title':[安全问题]: 【漏洞】 【master】CVE-2024-25741, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/I94PT0?from=project-issue, 'state':已拒绝, 'cve':CVE-2024-25741, 'targetId':15336612)\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "Issue('no':#IAQWPK, 'title':[安全问题]: 【OpenHamrony 5.0.0.41】【内核子系统】【ToC】【RK3568】【必现-10/10】【kernel_linux_5.10】【威胁等级】: 中CVE-2024-42312, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IAQWPK?from=project-issue, 'state':已拒绝, 'cve':CVE-2024-42312, 'targetId':18051608)\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "Issue('no':#IAQWW3, 'title':[安全问题]: 【安全】【CVE-2024-42304】【OpenHarmony:kernel_linux_5.10 】, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IAQWW3?from=project-issue, 'state':已拒绝, 'cve':CVE-2024-42304, 'targetId':18051843)\n",
      "\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "cveList = \"\"\"CVE-2024-39468\n",
    "CVE-2024-44938\n",
    "CVE-2024-43901\n",
    "CVE-2024-44958\n",
    "CVE-2024-44982\n",
    "CVE-2024-45028\n",
    "CVE-2024-45009\n",
    "CVE-2024-46677\n",
    "CVE-2024-42286\n",
    "CVE-2024-46675\n",
    "CVE-2022-48916\n",
    "CVE-2022-48905\n",
    "CVE-2024-44943\n",
    "CVE-2024-42136\n",
    "CVE-2024-43893\n",
    "CVE-2024-44948\n",
    "CVE-2022-48914\n",
    "CVE-2021-47610\n",
    "CVE-2024-41060\n",
    "CVE-2024-43906\n",
    "CVE-2024-45003\n",
    "CVE-2024-43904\n",
    "CVE-2023-52912\n",
    "CVE-2024-46798\n",
    "CVE-2022-48901\n",
    "CVE-2021-4441\n",
    "CVE-2024-44941\n",
    "CVE-2024-45018\n",
    "CVE-2023-52916\n",
    "CVE-2024-43912\n",
    "CVE-2024-42123\n",
    "CVE-2024-43895\n",
    "CVE-2024-44968\n",
    "CVE-2024-44950\n",
    "CVE-2022-48931\n",
    "CVE-2024-43913\n",
    "CVE-2024-44947\n",
    "CVE-2024-45008\n",
    "CVE-2024-45016\n",
    "CVE-2024-44940\n",
    "CVE-2024-46674\n",
    "CVE-2022-48893\n",
    "CVE-2024-43909\n",
    "CVE-2022-48826\n",
    "CVE-2022-48906\n",
    "CVE-2022-48923\n",
    "CVE-2024-43894\n",
    "CVE-2024-43886\n",
    "CVE-2024-44960\n",
    "CVE-2024-42253\n",
    "CVE-2022-48902\n",
    "CVE-2022-48910\n",
    "CVE-2024-45026\n",
    "CVE-2024-46673\n",
    "CVE-2024-44939\n",
    "CVE-2024-1151\n",
    "CVE-2024-45015\n",
    "CVE-2024-41076\n",
    "CVE-2024-44952\n",
    "CVE-2023-52915\n",
    "CVE-2022-48900\n",
    "CVE-2024-41066\n",
    "CVE-2024-46700\n",
    "CVE-2023-45896\n",
    "CVE-2024-44988\n",
    "CVE-2022-48920\n",
    "CVE-2024-44957\n",
    "CVE-2024-25741\n",
    "CVE-2024-42287\n",
    "CVE-2024-45025\n",
    "CVE-2024-38600\n",
    "CVE-2024-43903\n",
    "CVE-2024-46800\n",
    "CVE-2024-45021\n",
    "CVE-2024-44954\n",
    "CVE-2023-52898\n",
    "CVE-2024-42312\n",
    "CVE-2023-52893\n",
    "CVE-2024-43879\n",
    "CVE-2024-44969\n",
    "CVE-2024-43834\n",
    "CVE-2024-43880\n",
    "CVE-2024-43830\n",
    "CVE-2022-48896\n",
    "CVE-2024-44965\n",
    "CVE-2024-43914\n",
    "CVE-2022-48921\n",
    "CVE-2024-42304\n",
    "CVE-2023-52901\n",
    "CVE-2023-52894\n",
    "CVE-2024-42292\"\"\"\n",
    "cveList = cveList.split(\"\\n\")\n",
    "for cve in cveList:\n",
    "    print(analysisService.getGiteeAnalysis(cve))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
